﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GraphicUserInterface.MainForm.NewAccount;

namespace GraphicUserInterface.MainForm.Encrypt_Decrypt
{
    public partial class frEncryptDecryptData : Form
    {
        int iUserID;
        public frEncryptDecryptData(int iUserID)
        {
            InitializeComponent();
            this.iUserID = iUserID;
        }

        private void btBack_Click(object sender, EventArgs e)
        {
            this.Owner.Show();
            this.Close();
        }

        private void btEncrypt_Click(object sender, EventArgs e)
        {
            frEncryptData frEncrypt = new frEncryptData(this.iUserID);
            frEncrypt.Owner = this;
            frEncrypt.Show();
            this.Hide();
        }

        private void btDecrypt_Click(object sender, EventArgs e)
        {
            frDecryptData decryptDataForm = new frDecryptData(this.iUserID);
            frCheckPassphraseValid checkPassphraseValidForm = new frCheckPassphraseValid(this.iUserID, decryptDataForm);
            checkPassphraseValidForm.Owner = this;
            checkPassphraseValidForm.Show();
            this.Hide();
        }
    }
}
